package com.kyrioscraft.cloud.thead.jdklab.tools.singletom;

/**
 * @Author kyrioscraft
 * @Date 2019/2/22 10:40
 * @Description 懒汉式
 **/
public class LazySingletom {
    private LazySingletom() {
        System.out.println("LazySingletom is create");
    }
    private static LazySingletom instance = null;

    public static synchronized LazySingletom getInstance() {
        if(instance == null) {
            instance = new LazySingletom();
        }
        return instance;
    }
}
